<?php if (!defined('THINK_PATH')) exit();?>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo ($SHOP_NAME); ?>团购管理系统</title>
<link rel="stylesheet" type="text/css" href="__TMPL__ThemeFiles/Css/style.css" />
<script type="text/javascript" src="__TMPL__ThemeFiles/Js/Base.js"></script>
<script type="text/javascript" src="__TMPL__ThemeFiles/Js/prototype.js"></script>
<script type="text/javascript" src="__TMPL__ThemeFiles/Js/mootools.js"></script>
<script type="text/javascript" src="__TMPL__ThemeFiles/Js/Ajax/ThinkAjax.js"></script>
<script type="text/javascript" src="__TMPL__ThemeFiles/Js/common.js"></script>
<script type="text/javascript" src="__TMPL__ThemeFiles/Js/Util/ImageLoader.js"></script>
<script type="text/javascript" src="__TMPL__ThemeFiles/Js/kindeditor/kindeditor.js"></script>
<script language="JavaScript">
<!--
//指定当前组模块URL地址 
var URL = '__URL__';
var ROOT_PATH = '__ROOT__';
var APP	 =	 '__APP__';
var PUBLIC = '__TMPL__ThemeFiles';
ThinkAjax.image = [	 '__TMPL__ThemeFiles/Images/loading2.gif', '__TMPL__ThemeFiles/Images/ok.gif','__TMPL__ThemeFiles/Images/update.gif' ]
ImageLoader.add("__TMPL__ThemeFiles/Images/bgline.gif","__TMPL__ThemeFiles/Images/bgcolor.gif","__TMPL__ThemeFiles/Images/titlebg.gif");
ImageLoader.startLoad();
var VAR_MODULE = '<?php echo c('VAR_MODULE');?>';
var VAR_ACTION = '<?php echo c('VAR_ACTION');?>';
var CURR_MODULE = '<?php echo ($module_name); ?>';
//-->
</script>
<script language="JavaScript">
//定义JS中使用的语言变量
var VIEW = '<?php echo (L("VIEW")); ?>';
var CONFIRM_DELETE = '<?php echo (L("CONFIRM_DELETE")); ?>';
var CONFIRM_DELETE_IMAGE = '<?php echo (L("CONFIRM_DELETE_IMAGE")); ?>';
var NO_SELECT = '<?php echo (L("NO_SELECT")); ?>';
var CHOOSE_RECYCLE_ITEM = '<?php echo (L("CHOOSE_RECYCLE_ITEM")); ?>';
var SELECT_EDIT_ITEM = '<?php echo (L("SELECT_EDIT_ITEM")); ?>';
var SELECT_DEL_ITEM	=	'<?php echo (L("SELECT_DEL_ITEM")); ?>';
var CONFIRM_DELETE_FILE = '<?php echo (L("CONFIRM_DELETE_FILE")); ?>';
var CONFIRM_FOREVER_DELETE = '<?php echo (L("CONFIRM_FOREVER_DELETE")); ?>';
var CONFIRM_DELETE_USER_DATA = '<?php echo (L("CONFIRM_DELETE_USER_DATA")); ?>';
var CONFIRM_RESTORE = '<?php echo (L("CONFIRM_RESTORE")); ?>';
var ATTR_PRICE	=	'<?php echo L("ATTR_PRICE");?>';
var ATTR_STOCK	=	'<?php echo L("ATTR_STOCK");?>';
</script>
</head>

<body onload="loadBar(0)">

<div id="loader" ><?php echo (L("PAGE_LOADING")); ?></div>

<!-- 菜单区域  -->



<!-- 主页面开始 -->

<div id="main" class="main" >



<!-- 主体内容  -->

<div class="content" >

<div class="title"><?php echo (L("DATA_LIST")); ?></div>

<!--  功能操作区域  -->

<div class="operate" >

<input type="button" id=""  name="" value="<?php echo (L("BACKUP_DATABASE")); ?>" onclick="" class="button">

<!-- 查询区域 -->

<div class="fRig">
<form method='post' action="">

</div>



</div>

<!-- 高级查询区域 -->

<div  id="searchM" class=" none search cBoth" >

</div>

</form>

</div>

<div >
<form  method='post' id="form" name="form" action="<?php echo u('Database/dump');?>">
<!-- 功能操作区域结束 -->
<table>
	<tr>
    	<td><input type="checkbox" name="checkbox"  onclick=" list_show(this.checked) "  />自定义备份<span style="color:red;">(若不选则为全部备份)</span></td>
    </tr>
    <tr>
    	<td></td>
    </tr>
</table>
<div id="data_list" style="display:none;">
<tbody id="showtables">
  <tr>
    <td colspan="2">
      <table>
        <tr>
          <td colspan="4"><input name="chkall" onclick="checkall(this.form, 'customtables[]')" type="checkbox"><b>全选</b></td>
        </tr>
        <tr>
        <?php if(is_array($tables)): $k = 0; $__LIST__ = $tables;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$table): ++$k;$mod = ($k % 2 )?><?php if((($k-1)%7) == 0): ?></tr><tr><?php endif; ?>
          <td><input name="customtables[]" value="<?php echo ($table); ?>"  type="checkbox"><?php echo ($table); ?></td><?php endforeach; endif; else: echo "" ;endif; ?>
        </tr>
        
      </table>
    </td>
  </tr>
  </tbody>
</div>
<table>
<tr>
    <td>备份文件名:</td>
    <td><input type="text" name="sql_file_name" value="<?php echo ($name); ?>">&nbsp; <input type="submit" value="开始备份" class="button" /></td>
  </tr>
     
</table>
</form>
</div>
<!-- 列表显示区域  -->

<div class="list" >

<table cellspacing="0" cellpadding="0" class="list" id="checkList">
	<tr><td height="5" class="topTd" colspan="5"/></tr>
	<tr class="row">
		<th width="8"></th>
		<th><?php echo (L("BACKUP_FILE")); ?></th>
		<th><?php echo (L("CREATE_TIME")); ?></th>
		<th><?php echo (L("OPERATION")); ?></th>
	</tr>
	<?php if(is_array($sql_list)): foreach($sql_list as $key=>$sql_item): ?><tr class="row">
			<td width="8"></td>
			<td><?php echo ($sql_item["filename"]); ?></td>
			<td><?php echo ($sql_item["filedate"]); ?></td>
			<td><a href="<?php echo U('Database/restore',array('dir'=>$sql_item['filename']));?>"><?php echo (L("RESTORE")); ?></a> <a href="<?php echo U('Database/delete',array('dir'=>$sql_item['filename']));?>"><?php echo (L("_DELETE_DATA")); ?></a></td>
		</tr><?php endforeach; endif; ?>
	<tr><td height="5" class="bottomTd" colspan="5"/></tr>
</table>

</div>

<!--  分页显示区域 -->

<!-- 列表显示区域结束 -->

</div>

<!-- 主体内容结束 -->

</div>

<!-- 主页面结束 -->
<script>
function checkall(frm, chk)
{
    for (i = 0; i < frm.elements.length; i++)
    {
        if (frm.elements[i].name == chk)
        {
            frm.elements[i].checked = frm.elements['chkall'].checked;
        }
    }
}
function list_show($is)
{
	if($is==1){ document.getElementById('data_list').style.display="block";}
	else{
		document.getElementById('data_list').style.display="none";
		}
}
</script>